package com.example.twitterfake;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class Home extends Activity{

	EditText ednovidade;
	TextView novidade;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_home);
		
		ednovidade = (EditText)findViewById (R.id.ednovidade);
		Button btpostar = (Button)findViewById (R.id.btpostar);
		novidade = (TextView) findViewById (R.id.tv_novidade1);
		Button btsair = (Button) findViewById(R.id.btsair);
		
		btsair.setOnClickListener(new View.OnClickListener(){
			public void onClick(View arg0) {
				Intent login = new Intent(Home.this,Login.class);
				Home.this.startActivity(login);
				Home.this.finish();	
			}
		});
		
		btpostar.setOnClickListener(new View.OnClickListener(){
			public void onClick(View arg0) {
				Twitt t = new Twitt ();
				t.postar (novidade, ednovidade);
			}
		});
	}
	
}
